<!DOCTYPE html>
<html lang="en"   xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="../static/css/creatorCenter.css" th:href="@{/css/creatorCenter.css}">
    <link rel="stylesheet" href="../static/css/iconfont.css" th:href="@{/css/iconfont.css}">
    <link rel="stylesheet" href="../static/css/common.css" th:href="@{/css/common.css}">
    <link rel="stylesheet" href="../static/css/personCenter.css" th:href="@{/css/personCenter.css}">
    <link rel="stylesheet" href="../static/css/creatorCenterContent.css" th:href="@{/css/creatorCenterContent.css}">
    <title>导航栏示例</title>
</head>

<body>
<div class="main">
    <div class="nav-container" th:replace="creatorCenterAccount::Tap">
    </div>
    <div class="right">
        <div class="blockB">
            <div class="tap">
                <ul>
                    <li><a href="/userHomepage" class="tap-a" th:href="@{/userHomepage}">文章&nbsp;&nbsp;</a></li>
                    <li><a href="/userHomepage/videos" class="tap-a" th:href="@{/userHomepage/videos}" >视频&nbsp;&nbsp;  </a></li>
                    <li><a href="/userHomepage/views" class="tap-a" th:href="@{/userHomepage/views}" >想法&nbsp;&nbsp;  </a></li>
                    <li><a href="/userHomepage/likes" class="tap-a" th:href="@{/userHomepage/likes}" >喜欢&nbsp;&nbsp; </a></li>
                    <li class="active"> <a href="/userHomepage/follower" class="tap-a" th:href="@{/userHomepage/follower}" >关注订阅&nbsp; </a></li></ul>
            </div>

            <div class="attention" style="display: block;">
                <div class="mydongtai">
                    <div class="tab-container">
                        <div class="tab-header">
                            <span class="tab-item"><a href="/userHomepage/follower" class="tap-a" th:href="@{/userHomepage/follower}" >我关注的人 </a></span>
                            <span class="tab-item  active"><a href="/userHomepage/fans" class="tap-a" th:href="@{/userHomepage/fans}" >关注我的人</a></span>
                        </div></div>
                </div>
                <div class="tab-content">
                    <div class="contents-item active" id="personCenterFan">
                        <div style="display: block;" th:each="fan,fanStat: ${fans}">
                            <div class="answer-header" >
                                <img src="../static/img/image2.png" alt="用户头像"  th:src="${fan.avatar}" class="avatar">
                                <div class="user-infos">
                                    <span class="user-name" th:text="${fan.username}">汉唐传人</span>
                                    <p class="user-motto" th:text="${fan.bio}"></p>
                                </div>
                            </div>
                            <span id="follows" class="follows" th:attr="data-user-id=${fan.id}">关注他</span>
                            <div  class="user-icons" th:each="fan,fanStat: ${fans}"><span th:text="${fan.followerCount}">146</span>关注者</div>
                        </div></div>
                </div></div></div>
    </div>
</div>
<div class="mask"></div>
<script th:inline="javascript">

    document.addEventListener('DOMContentLoaded', function() {
        const pathname = window.location.pathname;
        let temp = 0;
        if (pathname === '/mainPageRecommend') {
            temp = 1

            document.getElementsByClassName('none-input')[0].value = temp
        } else if (pathname === '/mainPageAttention') {
            temp = 2
            document.getElementsByClassName('none-input')[0].value = temp
        } else if (pathname === '/mainPageTrending') {
            temp = 3
            document.getElementsByClassName('none-input')[0].value = temp
        }else if (pathname === '/creativeCenter') {
            temp=4
            document.getElementsByClassName('none-input')[0].value = temp
        }else if (pathname === '/toManageMyPosts') {
            temp=5
            document.getElementsByClassName('none-input')[0].value = temp
        }
        let result = [[${result}]];
        let errorMessage = [[${errorMessage}]];
        console.log(result)
        if (result && result !== '') {
            showCustomAlert(result, 3000);
        }
        if (errorMessage && errorMessage !== '') {
            showCustomAlert(errorMessage, 3000);
        }
    })

</script>
<script src="../static/js/creatorCenterContent.js" th:src="@{/js/creatorCenterContent.js}"></script>
<script src="../static/js/personCenter.js" th:src="@{/js/personCenter.js}"></script>
<script src="../static/js/common.js" th:src="@{/js/common.js}"></script>
</body>

</html>